package com.ss.android.image;

import android.content.DialogInterface;
import android.view.View;

import java.util.List;

final class s implements DialogInterface.OnShowListener {
    private final n a;

    s(n arg1) {
        this.a = arg1;
    }

    public final void onShow(DialogInterface arg6) {
        n v0 = this.a;
        if (v0.mImagePager != null) {
            v0.mFullPagerAdapter.a((List) null);
            v0.mFullPagerAdapter.notifyDataSetChanged();
            v0.mFullPagerAdapter.a(v0.g);
            v0.mFullPagerAdapter.notifyDataSetChanged();
            int v1 = v0.mFullPagerAdapter.getCount();
            if (v0.i >= 0 && v0.i < v1) {
                v0.mImagePager.setCurrentItem(v0.i, false);
            }

            v0.a(v0.mImagePager.getCurrentItem());
            v0.i = -1;
            if (v1 > 0) {
                v0.mSaveTextView.setVisibility(View.VISIBLE);
                return;
            }

            v0.mSaveTextView.setVisibility(View.GONE);
        }
    }
}

